<?php
$q=$_GET["q"];

$con = mysql_connect('localhost', 'root', '');
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("stms", $con);

$sql="SELECT * FROM combination";

$result = mysql_query($sql);

echo  "<div id=txtHint class=scrollbar >";
		  require_once 'data/databaseconnection.php';
			echo "<table border=1>";
			echo "<tr>";
			
			echo "<th>Regno</th>";
			echo "<th>Level</th>";
			echo "<th>Course1</th>";
			echo "<th>Course2</th>";
			echo "<th>Course3</th>";
			echo "<th>Course4</th>";
			echo "<th>Course5</th>";
			echo "<th>Course6</th>";
			$result=mysql_query("SELECT * FROM combination");
			while($row=mysql_fetch_array($result))
			{
				echo "<tr><td>".$row['Regno'];
				echo "<td>".$row['Level'];
				echo "<td>".$row['Main'];
				echo "<td>".$row['Elective1'];				
				echo "<td>".$row['Elective2'];
				echo "<td>".$row['Elective3'];
				echo "<td>".$row['Auxilary1'];
				echo "<td>".$row['Auxilary2'];
			}
			echo "</table>";
			}
			
			}
			
			
			echo "</div>";

mysql_close($con);
?> 